3.361 \(\int \frac {\cos (c+d x) \cot ^2(c+d x)}{a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=30 \[ -\frac {\csc (c+d x)}{a d}-\frac {\log (\sin (c+d x))}{a d} \]

[Out]

-csc(d*x+c)/a/d-ln(sin(d*x+c))/a/d

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2836, 12, 43} \[ -\frac {\csc (c+d x)}{a d}-\frac {\log (\sin (c+d x))}{a d} \]

Antiderivative was successfully verified.

[In]

Int[(Cos[c + d*x]*Cot[c + d*x]^2)/(a + a*Sin[c + d*x]),x]

[Out]

-(Csc[c + d*x]/(a*d)) - Log[Sin[c + d*x]]/(a*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2836

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d*x)/b
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rubi steps

\begin {align*} \int \frac {\cos (c+d x) \cot ^2(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {a^2 (a-x)}{x^2} \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {a-x}{x^2} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {a}{x^2}-\frac {1}{x}\right ) \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=-\frac {\csc (c+d x)}{a d}-\frac {\log (\sin (c+d x))}{a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 22, normalized size = 0.73 \[ -\frac {\csc (c+d x)+\log (\sin (c+d x))}{a d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[c + d*x]*Cot[c + d*x]^2)/(a + a*Sin[c + d*x]),x]

[Out]

-((Csc[c + d*x] + Log[Sin[c + d*x]])/(a*d))

________________________________________________________________________________________

fricas [A]  time = 0.54, size = 34, normalized size = 1.13 \[ -\frac {\log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) \sin \left (d x + c\right ) + 1}{a d \sin \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*csc(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

-(log(1/2*sin(d*x + c))*sin(d*x + c) + 1)/(a*d*sin(d*x + c))

________________________________________________________________________________________

giac [A]  time = 0.16, size = 30, normalized size = 1.00 \[ -\frac {\frac {\log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a} + \frac {1}{a \sin \left (d x + c\right )}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*csc(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

-(log(abs(sin(d*x + c)))/a + 1/(a*sin(d*x + c)))/d

________________________________________________________________________________________

maple [A]  time = 0.18, size = 30, normalized size = 1.00 \[ -\frac {\csc \left (d x +c \right )}{a d}+\frac {\ln \left (\csc \left (d x +c \right )\right )}{a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*csc(d*x+c)^2/(a+a*sin(d*x+c)),x)

[Out]

-csc(d*x+c)/a/d+1/a/d*ln(csc(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.68, size = 29, normalized size = 0.97 \[ -\frac {\frac {\log \left (\sin \left (d x + c\right )\right )}{a} + \frac {1}{a \sin \left (d x + c\right )}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*csc(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-(log(sin(d*x + c))/a + 1/(a*sin(d*x + c)))/d

________________________________________________________________________________________

mupad [B]  time = 8.70, size = 59, normalized size = 1.97 \[ -\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}-\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )+\frac {1}{2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}}{a\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^3/(sin(c + d*x)^2*(a + a*sin(c + d*x))),x)

[Out]

-(log(tan(c/2 + (d*x)/2)) + tan(c/2 + (d*x)/2)/2 - log(tan(c/2 + (d*x)/2)^2 + 1) + 1/(2*tan(c/2 + (d*x)/2)))/(
a*d)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*csc(d*x+c)**2/(a+a*sin(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________